home *** CD-ROM | disk | FTP | other *** search
/ Freelog 55 / Freelog055.iso / Bas / Screen-Saver / Tocs / tocs.exe / Movie.swf / scripts / DefineSprite_20 / frame_1 / PlaceObject2_19_1 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2002-02-25  |  960b  |  35 lines

  1. onClipEvent(enterFrame){
  2.    curTime = new date();
  3.    if(9990 < math.abs(_parent.timeZone))
  4.    {
  5.       curHours = curTime.getHours();
  6.       curMinutes = curTime.getMinutes();
  7.    }
  8.    else
  9.    {
  10.       tMinutes = curTime.getUTCMinutes() + zoneMinutes;
  11.       curMinutes = tMinutes >= 0 ? tMinutes % 60 : tMinutes + 60;
  12.       curHours = (curTime.getUTCHours() + zoneHours + math.floor(tminutes / 60) + 24) % 24;
  13.    }
  14.    if(curHours >= 12)
  15.    {
  16.       shcolor.setRGB(16711680);
  17.       curHours = curhours - 12;
  18.    }
  19.    else
  20.    {
  21.       shcolor.setRGB(11141375);
  22.    }
  23.    curSeconds = curTime.getSeconds();
  24.    MSecond = curTime.getMilliSeconds();
  25.    hourHand._x = 0;
  26.    hourHand._y = 0;
  27.    hourHand._rotation = curHours * 30 + curMinutes / 2;
  28.    minuteHand._x = 0;
  29.    minuteHand._y = 0;
  30.    minuteHand._rotation = curMinutes * 6;
  31.    secondHand._x = 0;
  32.    secondHand._y = 0;
  33.    secondHand._rotation = curSeconds * 6 + 6 * mSecond / 1000;
  34. }
  35.